<template>
  <Layout />
</template>

<script setup>
import { onMounted, onBeforeMount, watch } from "vue";
import { useRoute, useRouter } from "vue-router";
import { useStore } from "vuex";
import Layout from "@/layout/index.vue";
import bus from "@/utils/bus";
import { start } from "qiankun";

const store = useStore();
const route = useRoute();
/* 初始化 */
store.dispatch("initGlobalData");

onMounted(() => {
  if (!window.qiankunStarted) {
    window.qiankunStarted = true;
    start({
      sandbox: {
        prefetch: true, //预加载
        strictStyleIsolation: false, // 启用shadowDOM,子应用样式完全隔离,互不影响
        experimentalStyleIsolation: true, //一般选择此方式，子应用会增加一个特殊的选择器规则来限定其影响范围，父应用仍可以影响子应用，子应用之间互不影响
      },
    });
  }
});
</script>
<style>
/* .box{
  background-color: red !important;
} */
</style>
